module.exports = {
  collectCoverage: false,
  collectCoverageFrom: [
    'src/**/*.{ts,tsx,js,jsx}',
    '!src/**/index.{ts,tsx,js,jsx}',
    '!src/**/*.d.{ts,tsx}',
    '!src/**/*.config.js',
    '!src/**/(__tests__|tests|__storybook__|__mocks__|__stubs__)/*.{ts,tsx,js,jsx}',
    '!src/public/assets/**/*.{ts,tsx,js,jsx}',
  ],
  moduleDirectories: ['node_modules'],
  coverageDirectory: 'artifacts',
  setupFilesAfterEnv: ['<rootDir>/jest/jest.setup.js'],
  snapshotSerializers: ['enzyme-to-json/serializer'],
  transform: {
    '^.+\\.tsx?$': 'ts-jest',
    '.+\\.(css|styl|less|sass|scss)$': 'jest-css-modules-transform',
    '\\.(svg|png|jpg|woff2|woff|eot|ttf)$': '<rootDir>/jest/file-preprocessor.js',
  },
  transformIgnorePatterns: ['/node_modules/(?!(\\S+\\.css))', '/node_modules/(?!(\\S+\\.js))'],
  testMatch: ['<rootDir>/src/**/__tests__/**/*.test.(ts|tsx|js|jsx)', '<rootDir>/tests/**/*.test.(ts|tsx|js|jsx)'],
  moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
  modulePaths: ['jest'],
  modulePathIgnorePatterns: ['promise-polyfill/*'],
  moduleNameMapper: {
    '.scss$': 'empty-stub.js',
    'react-perfect-scrollbar/dist/css/styles.css': 'empty-stub.js',
    'rc-switch/assets/index.css': 'empty-stub.js',
    'rc-slider/assets/index.css': 'empty-stub.js',
    'promise-polyfill/src/polyfill': 'empty-stub.js',
    'react-datepicker/dist/react-datepicker.css': 'empty-stub.js',
    'draft-js/dist/Draft.css': 'empty-stub.js',
    'style.css': 'empty-stub.js',
    'react-phone-number-input/style.css': 'empty-stub.js',
    'redux-persist/es/constants': 'empty-stub.js',
    'react-inner-image-zoom/lib/InnerImageZoom/styles.min.css': 'empty-stub.js',
  },
  testEnvironmentOptions: { url: 'http://localhost' },
  testEnvironment: 'jest-environment-jsdom',
};
